<?php
if(!empty($_POST))
{
	
	$id = $_POST['Id'];
//	print_r($_POST);die;
	$result = update('nav', $_POST, $id);
	if($result)
	{
		echo '更新成功';
		header('Refresh:1;index.php?a=admin&b=nav&c=index');
		die;
	}else
	{
		echo '更新失败';
		header('Refresh:1;index.php?a=admin&b=nav&c=index');
		die;	
	}
}
$id = $_GET['id'];
$re = selectone('nav','Id='.$id);
$father = selectAll('nav',"pid=0");

include('app/admin/nav/html/update.html');
?>